package main

import (
	"happy-go/microservice/rpc/proxy/handler"
	"net"
	"net/rpc"

	"happy-go/microservice/rpc/proxy/server/stub"
)

func main() {
	listen, _ := net.Listen("tcp", ":8889")

	err := stub.RegisterClickService(&handler.ClickService{})
	if err != nil {
		panic(err)
	}
	for {
		conn, _ := listen.Accept()
		go rpc.ServeConn(conn)
	}
}
